package com.itheima.servlet;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

// WebServlet中的value属性和urlPatterns都是来配置Servlet的访问路径
// @WebServlet(urlPatterns = {"/demo041", "/demo042"})
// @WebServlet("/user/*")
// @WebServlet("*.do")
// @WebServlet("/user/*.do") // 注意:不能同时配置目录匹配和扩展名匹配
// @WebServlet("/")
@WebServlet("/*")
public class ServletDemo04 extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        doGet(request, response);
    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        System.out.println("ServletDemo04");
    }
}
